package com.qf.blogsystem.dao;

import com.qf.blogsystem.core.dao.BaseDao;
import com.qf.blogsystem.entity.User;

import java.sql.SQLException;
import java.util.List;

/**
 * @author Crazy
 * @version 1.0
 * @description: 用户Dao接口
 * @date 2022/12/6 0:30
 */
public interface UserDao extends BaseDao<User> {
    /**
     * 根据激活码查询用户信息
     * @param activationCode
     * @return User
     * @throws Exception
     */
    User selectByActivationCode(String activationCode) throws Exception;

    /**
     * 根据用户名查询用户信息
     * @param username
     * @return User
     * @throws Exception
     */
    User selectByUsername(String username)  throws Exception;

    /**
     * 根据用户id修改用户头像信息
     * @param id
     * @param filePath
     * @throws Exception
     */
    Integer updateHeaderUrl(Integer id, String filePath)  throws Exception;

    /**
     * 根据邮箱查询用户信息
     * @param email
     * @return User
     */
    User selectByEmail(String email) throws Exception;
}
